package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)
//@FeignClient("service-vod")//要调用的方法在注册中心的注册名
public interface VodClient {
    //定义调用的方法路径
    //根据id删除阿里云视频
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);

    //删除多个阿里云的视频
    //参数多个视频id
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBath(@RequestParam("videoList") List<String> videoIdList);
}
